#ifndef __ITIMERMANAGER_H__
#define __ITIMERMANAGER_H__

#include "CTypes.h"
#include "ITimer.h"

typedef IListContainer<ITimer>	TimerList;

class ITimerManager
{
protected:
	u32 FrameTime;
	u32 ActualTime;

	TimerList tlist;

public:
	ITimerManager():FrameTime(1)						{}
	virtual ~ITimerManager()							{}

	virtual u32 GetRealClockTime()						= 0;
	virtual u32 GetActualTime()							= 0;
	virtual u32 GetFrameTime()							= 0;

	virtual ITimer *GetNewTimer()						= 0;
	virtual bool StartTimer(ITimer *t)					= 0;
	virtual void SetAndStartTimer(ITimer *t,u32 Time)	= 0;
	virtual u32 Update()								= 0;
	virtual bool DeleteTimer(ITimer *t)					= 0;
};

POWERLIBRARYENGINE_API ITimerManager *GetTimeManager();
POWERLIBRARYENGINE_API void DeleteTimeManager();
void SetTimeManager(ITimerManager *nv);
#define TimeManager		GetTimeManager()

#endif
